<?php
namespace Admin\Controller;
use Think\Controller;
class LogController extends CommonController {
	public function index(){

		$log = M('log');
		$count = $log -> count();
		$Page       = new \Think\Page($count,15);

		 $Page->setConfig('header','<span class="total">共<b>%TOTAL_ROW%</b>条数据，第<b>%NOW_PAGE%</b>页/共<b>%TOTAL_PAGE%</b>页</span>');
        $Page->setConfig('prev','上一页');
        $Page->setConfig('next','下一页');
        $Page->setConfig('last','末页');
        $Page->setConfig('first','首页');
        $Page->setConfig('theme','%FIRST% %UP_PAGE% %LINK_PAGE% %DOWN_PAGE% %END% %HEADER%');

		$show = $Page->show();
		$ldata = $log -> order('ctime desc') ->limit($Page->firstRow.','.$Page->listRows) -> select();

		// var_dump($show);
		// die;
		$this -> assign('data', $ldata);
		$this->assign('page',$show);
		$this -> display();
    }
}